![]() | URL Field CapabilitiesThe URL field supports various special protocols and placeholders. |
The URL field can execute any valid URL, for which you have defined a protocol handler. On most
systems at least the http://
, ftp://
and mailto:
protocols are defined. KeePass supports
all registered protocols that Internet Explorer supports.
For example, if you globally (i.e. using the Windows Explorer) register PuTTY for ssh://
URLs,
KeePass will automatically use PuTTY for ssh://
URLs, too.
Instead of an URL, you can also execute command lines using the URL field.
To tell KeePass that the line you entered
is a command line, prefix it using cmd://
. For example if you would like to execute
Notepad, your URL could look like this:
cmd://C:\Windows\Notepad.exe C:\Test\MyTestFile.txt
The virtual cmd://
protocol also supports parameters for executed
applications, in contrast to
the file://
protocol. This was the main reason why cmd://
was introduced; with file://
you
aren't able to pass any parameters to started applications. Use the cmd://
protocol instead.
The paths for the cmd://
protocol don't need to be encoded. For example,
you do not have to replace space characters by %20
, as it is normally
required for other URLs. KeePass just cuts away the cmd://
virtual
protocol prefix and passes the remaining command line to Windows.
If the file path contains spaces, you must enclose it in quotes (").
Environment Variables:
Windows environment variables are supported.
For example %TEMP%
is replaced by the user's temporary path.
UNC Paths:
Windows-style UNC paths (starting with \\
) are directly
supported, i.e. do not need to be prefixed with cmd://
.
In the URL field, you can use several placeholders that will get automatically replaced when the URL is executed. For example:
http://www.yoursite.com/default.php?user={USERNAME}&pass={PASSWORD}
For this entry, KeePass will replace {USERNAME} by the data of the username field and {PASSWORD} by the data in the password field when you execute the link.
Exactly the same placeholders are supported as the auto-type feature supports. For a complete list of supported placeholders, see the Auto-Type Placeholders List.
Also note that the special placeholders are supported, too. For example,
the {APPDIR}
placeholder is replaced by the application
directory path of the currently running KeePass instance. It's the absolute path of the
directory containing the KeePass executable, without a trailing backslash.
If you would like to start a new KeePass instance, you could set the URL to:
cmd://"{APPDIR}\KeePass.exe"
To use different browsers for entries, you can use URLs like the following:
cmd://{INTERNETEXPLORER} "http://www.yoursite.com"
cmd://{FIREFOX} "http://www.yoursite.com"
cmd://{OPERA} "http://www.yoursite.com"
The browser placeholder will be replaced by the browser's executable path (if installed).
You can use the URL field of entries and the virtual cmd://
protocol to start remote desktop connections.
For this, enter the following in the URL field of an entry:
cmd://mstsc.exe
When you now double-click the URL field of the entry in the main window, a Windows remote desktop connection is initiated.
MSTSC is the Windows terminal server connection program (remote desktop connection). You can pass a path to an existing RDP file to the program to open it. For example, the following URL opens the specified RDP file:
cmd://mstsc.exe "C:\My Files\Connection.rdp"
MSTSC also supports several command line options:
The URL field behavior can be temporarily overridden by adding an entry in the Notes field.
This allows you to execute specific programs for individual KeePass entries.
Simply enter Url-Override:
followed by the command you require.
Then double click the URL of the entry in the main window to run your command.
Using a different browser:
If your default browser is Firefox and you want to open a specific site with
Internet Explorer, add the following to the Notes field:
Url-Override: cmd://{INTERNETEXPLORER} "{URL}"
KeePass will automatically open Internet Explorer and pass the data from the URL field as the parameter. This uses Placeholders to find Internet Explorer.
Running KeeForm:
If you want to open a specific site with KeeForm and Internet Explorer, add the
following to the Notes field:
Url-Override: cmd://"{APPDIR}\KeeForm.exe" "{URL}"
"{USERNAME}" "{PASSWORD}" {ENTERFORM}
KeePass will automatically open KeeForm and pass the data from the URL field, along with the user name and password as parameters.
Permanently changing the URL behavior:
If you want to change the default URL action (i.e. for all URLs),
you can add a
KeeUrlOverride
line to the
KeePass.ini
file.
To use KeeForm as the default URL handler, add the following line to the end of
KeePass.ini
:
KeeUrlOverride=cmd://"{APPDIR}\KeeForm.exe" "{URL}"
"{USERNAME}" "{PASSWORD}" {ENTERFORM}
More detailed KeeForm setup and usage instructions can be found in the help file of KeeForm.